package utils.test.img;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

import lion.dev.image.ImageJ;

/**
 * @author lion
 * @date 2016年9月24日
 */
public class TGIF {

	public static void main(String[] args) throws FileNotFoundException, IOException {

		// String id = "";
		resize("1");
		resize("2");
		resize("3");
		resize("4");
		resize("5");

		// GifDecoder decoder = new GifDecoder();
		// decoder.read(new FileInputStream("D:/5.gif"));
		// BufferedImage image = decoder.getFrame(0);

		// BufferedImage image = ImageIO.read(new FileInputStream("D:/5.gif"));
		// System.out.println(GifHandler.isTransparentImage(image));
	}

	private static void resize(String id) throws IOException, FileNotFoundException {

		ImageJ imageJ = new ImageJ(new File("D:/testimg/" + id + ".gif"));
		imageJ.resizeWidth(200).write(new FileOutputStream("D:/" + id + "_1.gif"));
	}
}
